Using buttons

Button is an object you can use to create interactions with 3D content through clicking.

Button does not have a visual shape, so you have to attach to it a 3D object, such as box node, to give the button a shape. When a user clicks the object attached to a button, the action generates a message that travels to the button where you can define the behavior for that message.

The Click message trigger is available by default, but you can add other message as well. For example, you can add messages that are triggered when a user presses down a mouse button or cancels a click.

Creating a button

To create a button:

  1. In the Project right-click the scene where you want to create a button and select Create > Button.
  2. In the Project add a mesh to the button.
    For example, right-click the button and select Create > Box.
  3. In the Project select the button, in the Properties in the Click message trigger click the Add drop-down menu, and select one of the triggers.
    For example, select Write Log and set its Log Message property to <Name>.
    In the Preview you can now click the mesh you added to the button and the trigger writes the name of the mesh to the Log window.

See also

Using toggle buttons

Using button layers

Using toggle button layers

Buttons